/**
 * 
 */
package com.fangqk.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.fangqk.dao.UserMapper;
import com.fangqk.entity.User;
import com.fangqk.service.UserService;

/**
 * @author G-Train
 *
 */
@Service("userService")
public class UserServiceImpl implements UserService {

	@Resource
	UserMapper userMapper;

	@Override
	public User selectByPrimaryKey(Integer userId) {
		return userMapper.selectByPrimaryKey(userId);
	}

	@Override
	public User selectByUserName(String userName) {
		return userMapper.selectByUserName(userName);
	}

	@Override
	public int insertUser(User user) {
		return userMapper.insert(user);
	}

	@Override
	public int deleteByPrimaryKey(Integer userId) {
		return userMapper.deleteByPrimaryKey(userId);
	}

	@Override
	public int updateByPrimaryKeySelective(User record) {
		return userMapper.updateByPrimaryKeySelective(record);
	}

}
